1. Field of the Invention
Methods and apparatuses consistent with the present invention relate to a method and apparatus for decoding and coding an image, and more particularly, to a method and apparatus for decoding and coding an image by searching for reference blocks having neighboring pixels similar to neighboring pixels of a current block, determining a reference block candidate that is most similar to the current block among the reference block candidates as a predicted block of the current block, and performing a prediction-coding process for the predicted block.
2. Description of the Related Art
In an image compressing method such as Moving Picture Experts Group-1 (MPEG-1), MPEG-2, MPEG-4 H.264/MPEG-4 Advanced Video coding (AVC), in order to code an image, a picture is divided into macro blocks. An optimal coding method is selected in consideration of a data size and a degree of distortion with respect to the macro blocks. The macro blocks are coded in the selected coding mode.
In an intra prediction method, blocks are coded, not by referring to a reference picture, but by using values of pixels that are spatially adjacent to the current block to be coded. First, a predicted block, with respect to the current block to be coded, is generated by using neighboring pixel values. Then, a residual block is generated by subtracting the predicted block from the current block, and the generated residual block is coded. Current macro blocks are prediction-coded in a mode among thirteen intra prediction modes so as to code the current block based on H.264 standards.
FIG. 1 illustrates 16×16 intra prediction modes, according to a conventional technique.
Referring to FIG. 1, the 16×16 intra prediction modes are divided into four modes comprising a vertical mode 0, a horizontal mode 1, a direct current (DC) mode 2, and a plane mode 3.
FIG. 2 illustrates 4×4 intra prediction modes, according to a conventional technique.
Referring to FIG. 2, the 4×4 intra prediction modes are divided into nine modes comprising a vertical mode 0, a horizontal mode 1, a DC mode 2, a diagonal down-left mode 3, a diagonal down-right mode 4, a vertical-right mode 5, a horizontal-down mode 6, a vertical-left mode 7, and a horizontal-up mode 8. The intra prediction mode numbers allocated to the modes as indices are determined based on usage frequencies of the modes. As described above, in the conventional intra prediction process, a predicted block is generated by using neighboring pixels of the current block to be coded with a thickness of one pixel. When there are many differences in an image between an intra-predicted block and neighboring blocks, there may be large differences between the intra-predicted block and an original block. In this case, performance of the intra prediction process using neighboring pixels may be deteriorated.
In addition, in the conventional inter prediction process, a predicted block of the current block is generated by performing a motion estimation and compensation process in units of various block sizes. However, in the conventional inter prediction process, motion vector information per block to be coded through the inter prediction process has to be transmitted. Accordingly, at a low bit rate, coding efficiency is deteriorated due to encoding of the motion vector information.